﻿using System.Xml.Serialization;
using MergeTI.TiEntityObjects;
using TI;
using TiEntityObject.Common;

namespace TiPort.TiEntityObjects
{
    public class DictionaryFactualAddress 
    {
        [XmlElement("OKATO")]
        public string OKATO { get; set; }

        [XmlElement("addressLine")]
        public string AddressLine { get; set; }

        [XmlElement("building")]
        public string Building { get; set; }

        [XmlElement("filledManually")]
        public bool bfilledManually { get; set; }

        public int filledManually { get { if(bfilledManually) return 1; else return 0;}}

        [XmlElement("shortStreet")]
        public string shortStreet { get; set; }

        [XmlElement("zip")]
        public string Zip { get; set; }


        [XmlElement("country")]
        [LinkObjectAttribute(ChildFieldName = "countryCode", IsDictionaryValue = true, IsPartialObject = false, ParentFieldName = "CountryID")]
        public Country Country { get; set; }
        public string CountryID { get; set;}


        [XmlElement("region")]        
        public DictionaryFactualAddressRegion  DictionaryFactualAddressRegion { get; set; }
        
                                            
        [XmlElement("settlement")]        
        public   DictionarySettlement Settlement{get;set;}
                
        

        [XmlElement("area")]
        public DictionaryFactualAddressArea area { get; set; }

    }
}
